#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
using namespace std;

typedef long long ll; //要用long long

ll a[3005];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	int n;
	while (cin >> n)
	{
		ll ans = 0;
		if (n < 3)cout << ans << " " << "RANDOM" << "\n";
		else
		{
			a[0] = 0;
			for (int i = 1; i < n - 2; i++)
			{
				a[i] = a[i - 1] + i;
			}
			for (int i = 0; i < n - 2; i++)
			{
				ans = ans + a[i];
			}
			cout << ans << " " << 3 * n - 3 << "\n";
		}
	}

	return 0;
}